package cn.com.api.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.com.api.entity.*;
import cn.com.api.mapper.base.*;
import cn.com.util.*;

//DAO
public interface ApiT_shipper_accountMapper extends T_shipper_accountMapperBase {

	// 根据id查看
	public Map<String, Object> findShipperInfoByC_id(@Param("c_id") String c_id);

	// 查看在岗的人员
	public List<ApiT_shipper_account> findShipperAtWork();
	
	// 根据city_id 查询在岗的配送员---手动派单--要分页
	public List<ApiT_shipper_account> findShipperAtWorkByCityIdListPage(@Param("city_id")Integer city_id,@Param("page")PageInfo pageInfo);

	// 查询空载的配送员：在岗，没有派送任务
	public List<ApiT_token> selectMemebrNoTask(@Param("city_id")Integer city_id);

	// 查看在岗配送员
	public List<Map<String, Object>> selectShipperAtWork();

	// 根据u_id 查询配送员账户记录
	public ApiT_shipper_account selectShipperAccountByUid(
			@Param("u_id") String u_id);
	
	// 根据订单号 查看在岗、空闲的配送员 
	public void selectShipperAtWorkByOrderId(@Param("orderId") String orderId);
	
	//查询配送员分页
	public List<ApiT_shipper_account> shipperListPage(@Param("page")PageInfo pageInfo);
	
	public int updateShipperAccount(ApiT_shipper_account shipperAccount);
	
	public ApiT_shipper_account findShipperById(@Param("user_id") String user_id);
}
